package maple.util.tasks;

import maple.lang.Command;
import maple.lang.Language;
import maple.util.Task;

public class GatewayTask extends Task
{
	public static enum Property{ PORT, INTERVAL, RECEIVER }; 

	/**
	 * construct a new task with the specified sender, command and receiver
	 *
	 * @param	sender		the specified sender
	 * @param	command		the specified command
	 * @param	receiver	the specified receiver
	 *
	 * @author	snowfoxy
	 * @since	2011-11-15
	 */
	public GatewayTask( final String sender, final Command command, final String receiver )
	{
		super( sender, command, receiver );
	}

	/**
	 * return true if this task is valid 
	 *
	 * @return	true if this task is valid 
	 *
	 * @author	snowfoxy
	 * @since	2011-11-15
	 */
	protected boolean isValid()
	{
		if( super.isValid() && ( _instruction == Language.Instruction.READ || _instruction == Language.Instruction.WRITE ) )
		{
			return true;
		}
		return false;
	}
}
